{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Machine Learning in Life Scicence WS 2016 - 2017\n",
    "## Exercise 1 - Dataset  \n",
    "a) Create a dataset in R^2 with two classes (positive with target 1 and negative with target 0). Consider 100 datapoints for each class. Let the instances for each class be sampled from a bivariate Gaussian distribution with the same variance."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Importing numpy and matplotlib\n",
    "\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#Settings\n",
    "## Creating dataset here, 100 data points \n",
    "# numpy.random.multivariate_normal(mean, cov[size])\n",
    "# Draw random samples from multivariate normal distribution\n",
    "mean = [0, 0]\n",
    "cov = [[0.7,0.5 ], [0.5, 0.5]] # diagonal variance \n",
    "n = 100 # number of points \n",
    "#Diagonal covariance means that points are oriented along x or y-axis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#Example taking from the website of sklearn\n",
    "# Here we are considering \"X\" is for multivariate\n",
    "\n",
    "x = np.random.multivariate_normal(mean, cov, n )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAf8AAAFkCAYAAAAuUDI+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3X10XPV95/HPTyYJmzSRxyZ1Gwp5sB5CDtkqkk2UBjxZ\nbCP7akOaJetksKZp0iTrgBDHCyZtTnuM27OlCW6TGEJpnJIAA4O7PcspW40txxjkJeBYkSDkpNQj\niaRyyB4aNFqHh5AT5N/+cTXSzHieZ+486L5f58wZNL4z94rBfO7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Sl7X26fpeFTIZY26UtMNa21bva/Eb\nY8xxSd+z1l6/8LORW7Rrn7X2y3W9OCxauBn7d0kbrLWP1ft6IBljfkPSuKTPS/ozSU9aa/97fa+K\nlr+MMWskfUPSgKRf1vlykN9KSYl6X4TfLAy19Eh6OPmadVsNRyR9oF7XhaxWyu295O9J4/i6pP9t\nrT1a7wtJ5enGPk3iW5LusNY+aYx5e70vBtkZY9rkbhJV9ztmHzpP0gpJz2e8/rykztpfDrJZ6I35\nqqTHrLX/Uu/rgWSM+YSkLknr6n0tmZZly98Yc8vCxIpcj3ljTIcxZkjSb0j6UvKtdbxsXyj2u8l4\nz/mSDko6YK29qz5XDjS8O+TOj/lEvS8EkjHmd+TejG1vxOJ2y3LMv8gNiH4s6R909jbDKyS9Juk+\na+2nPLg8Xyt1cyhjzNskPSLpcb6P+ljo9n9F0lXW2odSXv+2pFZr7UfrdW1wGWNul/RhSZdZa2fq\nfT2QjDEfkfS/JM1rqWG5Qu6wzLykN9g6BvCyDP9iLdyZvSXlpbdJGpE78e+EtfZndbkwSFps8R+V\nNCYpXM+/KH6XY8LfjNwJf7fW9eJ8biH4PyIpaK19tt7XA5cx5k1yt7NP9W1Jz0j6K2vtMzW/qBS+\nHvO31v409WdjzMty79CeJfjra6HF/6jcHpqbJP2mmzeStTZz7Bne+xtJ3zbGjEs6IXfp5Rvl/s8M\ndWKMuUNSSNKVkl5emMAsSaettWyLXkfW2pflrh5btJAxs/UOfsnn4Z8DrcvGsFnSuxYepxZeM3K/\nnxX1uii/stb+w8Iysj+XtEbuRl191tqf1/fKfG+H3L8Tj2a8/ilJ99T8alBIw+SLr7v9AQDwo2U5\n2x8AAORG+AMA4DOEPwAAPkP4AwDgM4Q/AAA+Q/gDAOAzhD8AAD5D+AMA4DOEPwAAPkP4AwDgM4Q/\nAAA+8/8B3ygrD68kA4MAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x6876be0>"
      ]
     },
     "metadata": {},
     "output_type": "display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QfsiJiMtoBNNlNO5v8FeZ+W/drWruioi1NA4ljv+L+YuZeUjvHZxM81DP\nRF9kl2bmNQe7nvkiIj4PrAOOA0aBHwL/kJnfnPE6FlKAkCRJB8e8uApDkiTNLQYISZJUzAAhSZKK\nGSAkSVIxA4QkSSpmgJAkScUMEJIkqZgBQpIkFTNASJKkYgYISZJUzAAhSZKK/X+a03R034Oc+wAA\nAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x68dba58>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Before plotting separate +ve and -ve values\n",
    "\n",
    "\n",
    "XPositive = [val for val in x[:,1]  if val >= 0]\n",
    "XNegative = [val for val in x[:,1]  if val < 0]\n",
    "plt.scatter(x[:,0],x[:,1]  , c = 'yellow')\n",
    "plt.axis('equal')\n",
    "plt.show()\n",
    "\n",
    "YPositive = [1] * len(XPositive)\n",
    "YZero = [0] * len(XNegative)\n",
    "plt.scatter(XPositive, YPositive, color='black')\n",
    "plt.scatter(XNegative, YZero , color='red')\n",
    "plt.axis('equal')\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exercise 2 - Linear Model\n",
    "a) Write the code to compute a Linear classification model. Apply it to the dataset created in Exercise 1. Plot the predicted class for a regular grid in R^2. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#Apply Linear Model on different type of distributions\n",
    "# Split the data into training/testing sets\n",
    "trainX =XNegative[:-20]  +  XPositive[:-20]# take 80 sample dataset as a Training\n",
    "testX = XNegative[-20:] +  XPositive[-20:] # take 20 sample datset for testing\n",
    "\n",
    "\n",
    "# Split target also into training/ testing sets\n",
    "trainY =  [0] * len(XNegative[:-20]) + [1] * len(XPositive[:-20])\n",
    "testY =   [0] * len(XNegative[-20:]) + [1] * len(XPositive[-20:])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#Converting List to  array for parsing\n",
    "trainX = np.asarray(trainX)\n",
    "trainY= np.asarray(trainY)\n",
    "\n",
    "trainX= trainX.reshape(trainX.size, 1)\n",
    "trainY= trainY.reshape(trainY.size, 1)\n",
    "\n",
    "testX = np.asarray(testX)\n",
    "testX = testX.reshape(testX.size, 1)\n",
    "\n",
    "testY =  np.asarray(testY)\n",
    "testY = testY.reshape(testY.size,1)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Linear Model Starts Here:\n",
      "Coefficients: [[ 0.54292384]]\n",
      "[[-0.04761076]]\n",
      "Mean squared error: 0.00\n",
      "Variance score: 0.62\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgwAAAFkCAYAAABMyWOlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3XmYHWWZ///3TRODyUDUgIlhhyRsw5Z8BQIDyJYWVHDm\ni0KDgKK44IyakUsv0O/oOA4oInHEQVBQYIAWRn+OQZawB5EA2k0GCEvIgmwhLIEEwxLoPL8/qhs6\nTfepOp2uc053v1/XdS7oOnfVuU/X6fSnn3qqKlJKSJIkVbJevRuQJEmNz8AgSZJyGRgkSVIuA4Mk\nScplYJAkSbkMDJIkKZeBQZIk5TIwSJKkXAYGSZKUy8AgSZJylRoYIuLUiLg7IlZGxLKI+G1ETC6w\n3gcioi0iXo2IBRFxQpl9SpKkysoeYdgXOAfYEzgYGAFcHxHv7GuFiNgK+D1wE7Ar8B/ABRFxSMm9\nSpKkPkQtbz4VERsDzwD7pZRu76Pm+8ChKaVdui1rBcaklA6rTaeSJKm7Ws9heBeQgOUVavYCbuyx\nbDYwraymJElSZevX6oUiIoAfAbenlB6oUDoeWN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 0x81820f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn import linear_model\n",
    "\n",
    "#Using Linear Model \n",
    "print ('Linear Model Starts Here:')\n",
    "\n",
    "#Intialize\n",
    "regr = linear_model.LinearRegression()\n",
    "\n",
    "\n",
    "# Fit\n",
    "regr.fit(trainX, trainY);\n",
    "\n",
    "# The Coefficients\n",
    "print ('Coefficients:', regr.coef_)\n",
    "\n",
    "#Predict\n",
    "predictY = regr.predict(testX)\n",
    "print(regr.predict(-1))\n",
    "#The mean squared error\n",
    "print(\"Mean squared error: %.2f\" % np.mean((predictY) - testY) **2  ) # (y^ - y)^2\n",
    "\n",
    "#Explained variance score: 1 is perfect\n",
    "print ('Variance score: %.2f' % regr.score(testX, testY))\n",
    "#plot outputs \n",
    "YPositive = [1] * len(XPositive[-20:])\n",
    "YZero = [0] * len(XNegative[-20:])\n",
    "plt.scatter(XPositive[-20:], YPositive, color='black')\n",
    "plt.plot(testX, predictY, color='blue', linewidth=3)\n",
    "plt.scatter(XNegative[-20:], YZero , color='red')\n",
    "\n",
    "\n",
    "plt.axis('equal')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exercise 3 - kNN Model\n",
    "a) Write the code to compute a KNN model. Apply it to the dataset created in Exercise 1. Plot the predicted class for a regular grid in R^2. "
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [default]",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
